package com.easyidea.its.domain.model.passport;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.easyidea.its.domain.model.BaseEntity;
import com.easyidea.its.domain.model.system.PassPort;


@Entity
@Table(name = "TrackLog")
public class TrackLog  extends BaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private PassPort passPort;//'生成该记录的卡口名称'
	private String plateNumber;//过车的车牌号码
	private String plateType;//过车的车牌类型。有普通小车，大车，警察等
	private String plateColor;//车牌的颜色 蓝色 黄色，白色
	private String direction;//表示过车卡口的行驶方向，与卡口表中的2个方向中的一个保持一致
	private String laneName;//表示车辆是从卡口的哪个车道经过的， 一般为阿拉伯数字从1开始
	private int speedThresh;//卡口如果带测试功能，这里表示限速值 单位 千米/小时
	private int speed;//车辆经过的速度值，单位与限速一样
	private Integer irregularities;//表示这条记录是否违章，比如超速等，0表示没有违章，1表示有违章，对应的违章类型表示违章类型。
	private String irregularitiesType;//违章类型编码，具体编号 有规定
	private Date passTime;//过车时间 精度到秒
	private Integer picType;//图片类型，表示ftp路径下存放的图片形式，目前有两种，一种是特写与全景合成一张，另一种是一张全景。
	private String firstPicPath;//表示图片所在的ftp路径
	private  String secondPicPath;//第二张图片所在路径，如果没有违章，一般不用
	private  Integer plateRectTop;//车牌号码在对应图片中的坐标
	private  Integer plateRectLeft;//车牌号码在对应图片中的坐标
	private  Integer plateRectWidth;//车牌号码在对应图片中的坐标
	private  Integer plateRectHeight;//车牌号码在对应图片中的坐标
	private  Short status  ;//目前暂时不用
	private  Short selPicNo;	//使用识别图片的编号是第一张还是第二张
	
	@ManyToOne(cascade=CascadeType.MERGE, fetch = FetchType.LAZY)
	@JoinColumn(name = "passPortName",referencedColumnName="passPortName")	
	public PassPort getPassPort() {
		return passPort;
	}
	public void setPassPort(PassPort passPort) {
		this.passPort = passPort;
	}
	@Column(name = "plateNumber",length=15)
	public String getPlateNumber() {
		return plateNumber;
	}
	public void setPlateNumber(String plateNumber) {
		this.plateNumber = plateNumber;
	}
	@Column(name = "plateType",length=16)
	public String getPlateType() {
		return plateType;
	}
	public void setPlateType(String plateType) {
		this.plateType = plateType;
	}
	@Column(name = "plateColor",length=16)
	public String getPlateColor() {
		return plateColor;
	}
	public void setPlateColor(String plateColor) {
		this.plateColor = plateColor;
	}
	@Column(name = "direction",length=32)
	public String getDirection() {
		return direction;
	}
	public void setDirection(String direction) {
		this.direction = direction;
	}
	@Column(name = "laneName",length=8)
	public String getLaneName() {
		return laneName;
	}
	public void setLaneName(String laneName) {
		this.laneName = laneName;
	}
	@Column(name = "speedThresh",length=6)
	public int getSpeedThresh() {
		return speedThresh;
	}
	public void setSpeedThresh(int speedThresh) {
		this.speedThresh = speedThresh;
	}
	@Column(name = "speed",length=6)
	public int getSpeed() {
		return speed;
	}
	public void setSpeed(int speed) {
		this.speed = speed;
	}
	@Column(name = "irregularities",length=4)
	public Integer getIrregularities() {
		return irregularities;
	}
	public void setIrregularities(Integer irregularities) {
		this.irregularities = irregularities;
	}
	@Column(name = "irregularitiesType",length=4)
	public String getIrregularitiesType() {
		return irregularitiesType;
	}
	public void setIrregularitiesType(String irregularitiesType) {
		this.irregularitiesType = irregularitiesType;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "passTime")
	public Date getPassTime() {
		return passTime;
	}
	public void setPassTime(Date passTime) {
		this.passTime = passTime;
	}
	@Column(name = "picType")
	public Integer getPicType() {
		return picType;
	}
	public void setPicType(Integer picType) {
		this.picType = picType;
	}
	@Column(name = "firstPicPath",length=128)
	public String getFirstPicPath() {
		return firstPicPath;
	}
	public void setFirstPicPath(String firstPicPath) {
		this.firstPicPath = firstPicPath;
	}
	@Column(name = "secondPicPath",length=128)
	public String getSecondPicPath() {
		return secondPicPath;
	}
	public void setSecondPicPath(String secondPicPath) {
		this.secondPicPath = secondPicPath;
	}
	@Column(name = "plateRectTop")
	public Integer getPlateRectTop() {
		return plateRectTop;
	}
	public void setPlateRectTop(Integer plateRectTop) {
		this.plateRectTop = plateRectTop;
	}
	@Column(name = "plateRectLeft")
	public Integer getPlateRectLeft() {
		return plateRectLeft;
	}
	public void setPlateRectLeft(Integer plateRectLeft) {
		this.plateRectLeft = plateRectLeft;
	}
	@Column(name = "plateRectWidth")
	public Integer getPlateRectWidth() {
		return plateRectWidth;
	}
	public void setPlateRectWidth(Integer plateRectWidth) {
		this.plateRectWidth = plateRectWidth;
	}
	@Column(name = "plateRectHeight")
	public Integer getPlateRectHeight() {
		return plateRectHeight;
	}
	public void setPlateRectHeight(Integer plateRectHeight) {
		this.plateRectHeight = plateRectHeight;
	}
	@Column(name = "status")
	public Short getStatus() {
		return status;
	}
	public void setStatus(Short status) {
		this.status = status;
	}
	@Column(name = "selPicNo")
	public Short getSelPicNo() {
		return selPicNo;
	}
	public void setSelPicNo(Short selPicNo) {
		this.selPicNo = selPicNo;
	}

}
